package scauCmiScaffolding.compiled;

import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;

public class _jet_findEntityByPrimaryKey_5 implements JET2Template {
    private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
    private static final String _jetns_java = "org.eclipse.jet.javaTags"; //$NON-NLS-1$

    public _jet_findEntityByPrimaryKey_5() {
        super();
    }

    private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
    
    private static final TagInfo _td_java_format_1_1 = new TagInfo("java:format", //$NON-NLS-1$
            1, 1,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_setVariable_2_2 = new TagInfo("c:setVariable", //$NON-NLS-1$
            2, 2,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/primaryKeys/@count", //$NON-NLS-1$
                "countPriKeys", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_3_9 = new TagInfo("c:get", //$NON-NLS-1$
            3, 9,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_3_64 = new TagInfo("c:get", //$NON-NLS-1$
            3, 64,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_iterate_3_127 = new TagInfo("c:iterate", //$NON-NLS-1$
            3, 127,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$pcols", //$NON-NLS-1$
                "primaryKey", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_3_171 = new TagInfo("c:get", //$NON-NLS-1$
            3, 171,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($primaryKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_choose_3_214 = new TagInfo("c:choose", //$NON-NLS-1$
            3, 214,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_when_3_224 = new TagInfo("c:when", //$NON-NLS-1$
            3, 224,
            new String[] {
                "test", //$NON-NLS-1$
            },
            new String[] {
                "$primaryKey/@order=$countPriKeys", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_3_272 = new TagInfo("c:get", //$NON-NLS-1$
            3, 272,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lower-case($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_otherwise_3_329 = new TagInfo("c:otherwise", //$NON-NLS-1$
            3, 329,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_3_342 = new TagInfo("c:get", //$NON-NLS-1$
            3, 342,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lower-case($primaryKey/@field)", //$NON-NLS-1$
            } );

    public void generate(final JET2Context context, final JET2Writer __out) {
        JET2Writer out = __out;
        RuntimeTagElement _jettag_java_format_1_1 = context.getTagFactory().createRuntimeTag(_jetns_java, "format", "java:format", _td_java_format_1_1); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_java_format_1_1.setRuntimeParent(null);
        _jettag_java_format_1_1.setTagInfo(_td_java_format_1_1);
        _jettag_java_format_1_1.doStart(context, out);
        JET2Writer _jettag_java_format_1_1_saved_out = out;
        while (_jettag_java_format_1_1.okToProcessBody()) {
            out = out.newNestedContentWriter();
            out.write(NL);         
            RuntimeTagElement _jettag_c_setVariable_2_2 = context.getTagFactory().createRuntimeTag(_jetns_c, "setVariable", "c:setVariable", _td_c_setVariable_2_2); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_setVariable_2_2.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_setVariable_2_2.setTagInfo(_td_c_setVariable_2_2);
            _jettag_c_setVariable_2_2.doStart(context, out);
            _jettag_c_setVariable_2_2.doEnd();
            out.write("\tpublic ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_3_9 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_9); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_3_9.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_3_9.setTagInfo(_td_c_get_3_9);
            _jettag_c_get_3_9.doStart(context, out);
            _jettag_c_get_3_9.doEnd();
            out.write(" find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_3_64 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_64); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_3_64.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_3_64.setTagInfo(_td_c_get_3_64);
            _jettag_c_get_3_64.doStart(context, out);
            _jettag_c_get_3_64.doEnd();
            out.write("ByPrimaryKey(");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_iterate_3_127 = context.getTagFactory().createRuntimeTag(_jetns_c, "iterate", "c:iterate", _td_c_iterate_3_127); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_iterate_3_127.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_iterate_3_127.setTagInfo(_td_c_iterate_3_127);
            _jettag_c_iterate_3_127.doStart(context, out);
            while (_jettag_c_iterate_3_127.okToProcessBody()) {
                RuntimeTagElement _jettag_c_get_3_171 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_171); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_3_171.setRuntimeParent(_jettag_c_iterate_3_127);
                _jettag_c_get_3_171.setTagInfo(_td_c_get_3_171);
                _jettag_c_get_3_171.doStart(context, out);
                _jettag_c_get_3_171.doEnd();
                out.write("  ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_choose_3_214 = context.getTagFactory().createRuntimeTag(_jetns_c, "choose", "c:choose", _td_c_choose_3_214); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_choose_3_214.setRuntimeParent(_jettag_c_iterate_3_127);
                _jettag_c_choose_3_214.setTagInfo(_td_c_choose_3_214);
                _jettag_c_choose_3_214.doStart(context, out);
                JET2Writer _jettag_c_choose_3_214_saved_out = out;
                while (_jettag_c_choose_3_214.okToProcessBody()) {
                    out = out.newNestedContentWriter();
                    RuntimeTagElement _jettag_c_when_3_224 = context.getTagFactory().createRuntimeTag(_jetns_c, "when", "c:when", _td_c_when_3_224); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_when_3_224.setRuntimeParent(_jettag_c_choose_3_214);
                    _jettag_c_when_3_224.setTagInfo(_td_c_when_3_224);
                    _jettag_c_when_3_224.doStart(context, out);
                    JET2Writer _jettag_c_when_3_224_saved_out = out;
                    while (_jettag_c_when_3_224.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_3_272 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_272); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_3_272.setRuntimeParent(_jettag_c_when_3_224);
                        _jettag_c_get_3_272.setTagInfo(_td_c_get_3_272);
                        _jettag_c_get_3_272.doStart(context, out);
                        _jettag_c_get_3_272.doEnd();
                        _jettag_c_when_3_224.handleBodyContent(out);
                    }
                    out = _jettag_c_when_3_224_saved_out;
                    _jettag_c_when_3_224.doEnd();
                    RuntimeTagElement _jettag_c_otherwise_3_329 = context.getTagFactory().createRuntimeTag(_jetns_c, "otherwise", "c:otherwise", _td_c_otherwise_3_329); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_otherwise_3_329.setRuntimeParent(_jettag_c_choose_3_214);
                    _jettag_c_otherwise_3_329.setTagInfo(_td_c_otherwise_3_329);
                    _jettag_c_otherwise_3_329.doStart(context, out);
                    JET2Writer _jettag_c_otherwise_3_329_saved_out = out;
                    while (_jettag_c_otherwise_3_329.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_3_342 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_342); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_3_342.setRuntimeParent(_jettag_c_otherwise_3_329);
                        _jettag_c_get_3_342.setTagInfo(_td_c_get_3_342);
                        _jettag_c_get_3_342.doStart(context, out);
                        _jettag_c_get_3_342.doEnd();
                        out.write(",");  //$NON-NLS-1$        
                        _jettag_c_otherwise_3_329.handleBodyContent(out);
                    }
                    out = _jettag_c_otherwise_3_329_saved_out;
                    _jettag_c_otherwise_3_329.doEnd();
                    _jettag_c_choose_3_214.handleBodyContent(out);
                }
                out = _jettag_c_choose_3_214_saved_out;
                _jettag_c_choose_3_214.doEnd();
                _jettag_c_iterate_3_127.handleBodyContent(out);
            }
            _jettag_c_iterate_3_127.doEnd();
            out.write(");");  //$NON-NLS-1$        
            out.write(NL);         
            _jettag_java_format_1_1.handleBodyContent(out);
        }
        out = _jettag_java_format_1_1_saved_out;
        _jettag_java_format_1_1.doEnd();
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
    }
}
